﻿@model IEnumerable<SalesPortal.Web.Models.Project>
@if ((Model != null) && (Model.Count() > 0))
{
<table class="table">
    <tr>
        <th class="col-md-1 nowrap">
            @Html.DisplayNameFor(model => model.Name)
        </th>
        <th></th>
    </tr>

    @foreach (var item in Model)
    {
        <tr>
            <td>
                @Html.DisplayFor(modelItem => item.Name)
            </td>
            <td>
                @Html.ActionLink("Edit", "Edit", new { id = item.Id.ToString("N") }) |
                @Html.ActionLink("Details", "Details", new { id = item.Id.ToString("N") }) |
                @Html.ActionLink("Delete", "Delete", new { id = item.Id.ToString("N") }) |
                @Html.ActionLink("Units", "List", "Unit", new { id = item.Id.ToString("N") }, null)
                
            </td>
        </tr>
    }
</table>
}
else
{
    <p>There are no projects defined.</p>
}